package com.atguigu.eduorder.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class OrderPayUtil implements InitializingBean {
    @Value("${wx.pay.appid}")
    private String payId;
    @Value("${wx.pay.partner}")
    private String partner;
    @Value("${wx.pay.partnerkey}")
    private String partnerKey;

    public static String WX_PAY_ID;
    public static String WX_PARTNER;
    public static String WX_PARTNER_KEY;

    @Override
    public void afterPropertiesSet() throws Exception {
        WX_PAY_ID=payId;
        WX_PARTNER=partner;
        WX_PARTNER_KEY=partnerKey;
    }
}
